package com.example.wanxiang.repository;

import com.example.wanxiang.entity.Chat;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface ChatRepository extends MongoRepository<Chat, String> {

    void deleteBySponsor(String sponsor);

    Page<Chat> getChatBySponsor(String id, PageRequest request);

    long countChatBySponsor(String sponsor);
}

